From 4784ab249a6a8f588cf5b7e467d4d486c5009e9f Mon Sep 17 00:00:00 2001 From: Tim Deegan Date: Wed, 18 Apr 2012 16:43:13 +0100 Subject: [PATCH] x86/mm: BUG() rather than panic() on mm lock order violations That gives us a backtrace showing where the bad lock happens. Reported-by: Andres Lagar-Cavilla Acked-by: Andres Lagar-Cavilla Committed-by: Tim Deegan --- xen/arch/x86/mm/mm-locks.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/mm/mm-locks.h b/xen/arch/x86/mm/mm-locks.h index c973b4672b..8f5c7f5a14 100644 --- a/xen/arch/x86/mm/mm-locks.h +++ b/xen/arch/x86/mm/mm-locks.h @@ -50,8 +50,11 @@ static inline int mm_locked_by_me(mm_lock_t *l) #define __check_lock_level(l) \ do { \ if ( unlikely(__get_lock_level()) > (l) ) \ - panic("mm locking order violation: %i > %i\n", \ - __get_lock_level(), (l)); \ + { \ + printk("mm locking order violation: %i > %i\n", \ + __get_lock_level(), (l)); \ + BUG(); \ + } \ } while(0) #define __set_lock_level(l) \ -- 2.30.2